<html lang="zh-cn" >
<head>
    <meta charset="utf-8" />
    <meta HTTP-EQUIV="pragma" CONTENT="no-cache">
    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <meta HTTP-EQUIV="expires" CONTENT="0">
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no" media="screen"/>
    <title>对话窗口</title>
    <link rel="icon" type="image/png" href="../../img/icon.png">
    <link rel="stylesheet" type="text/css" href="../css/app.css">
    <link rel="stylesheet" type="text/css" href="../css/message.css">
    <link rel="stylesheet" type="text/css" href="../css/msgWin.css">
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="/pc/js/all.js"></script>
    <style type="text/css">
    </style>
</head>
<body>
<div id="msgTitle">
    <b>商务来着<span id="titleName">XX公司</span></b>
    <img src="../images/return.png" id="msgComRtn">
</div>

<div class="speak_window">
    <div class="speak_box">
        <div class="answer">
            <div class="heard_img left" style="background:#ffffff;">
                <img src="../images/toux01.png" height="20">
            </div>
            <div class="answer_text">
                <p>Hi，欢迎来此交流！</p>
                <i></i>
            </div>
        </div>
        <!--<div class="question">-->
            <!--<div class="heard_img right" style="background:#ffffff;">-->
                <!--<img src="../images/toux01.png" height="20">-->
            <!--</div>-->
            <!--<div class="question_text">-->
                <!--<p>Hi，欢迎来此交流！</p>-->
                <!--<i></i>-->
            <!--</div>-->
        <!--</div>-->
    </div>
</div>

<div class="wenwen-footer">
    <div class="wenwen_btn left" onclick="getComAccept()">刷新</div>
    <div class="wenwen_text left">
        <div class="write_box">
            <input type="text" id="quest" class="left" placeholder="请输入关键字"/>
        </div>
    </div>
    <div class="wenwen_help right">
        <button class="right" onclick="setComSend()">发送</button>
    </div>
    <div class="clear"></div>
</div>
<input type="hidden" id="talkId" value="0">





<!----------错误提示---------->
<div id="errMsg"></div>
<!----------错误提示---------->

<script type="text/javascript" src="../js/app.js"></script>
<script type="text/javascript" src="../js/messagePageChange.js"></script>
<script type="text/javascript" src="../js/msg.js"></script>
<script type="application/javascript">
    (function(){
        $('#talkId')[0].value = getUrlParam('id');
        $('#titleName').html(getUrlParam('comName'));
        getComAccept();
        setTimeout(function(){
            getTalkCache();
        },0);
    })();
    /**
     * 本地对话获取
     * */
    function getTalkCache(){
        var talkCache = cacheGet('msgCompany');
        console.log(talkCache)
        if (talkCache=='' || talkCache==null) {
            console.log('没有历史缓存！'); return;
        }
        var i, h = '';
        for (i=0;i<talkCache.length;i++) {
            var head = '';
            if (talkCache[i].head=='') {
                head = '../images/toux01.png';
            } else {
                head = talkCache[i].head;
            }
            if (talkCache[i].align=='right') {
                h += '<div class="question">';
                h += '<div class="heard_img right">';
                h += '<img src="'+head+'" height="40">';
                h += '</div>';
                h += '<div class="question_text">';
                h += '<p>'+talkCache[i].detail+'</p>';
                h += '<i></i>';
                h += '</div>';
                h += '</div>';
            } else {
                h += '<div class="answer">';
                h += '<div class="heard_img left">';
                h += '<p>'+talkCache[i].detail+'</p>';
                h += '</div>';
                h += '<div class="answer_text">';
                h += '<p>'+talkCache[i].detail+'</p>';
                h += '<i></i>';
                h += '</div>';
                h += '</div>';
            }
        }
        $('.speak_box').append(h);
        console.log('获取缓存成功！');
    }
</script>
</body>
</html>